<script setup lang="ts">
// import { ref } from 'vue'

// defineProps<{ msg: string }>()
import { useCounterStore } from '@/stores/counter'
const store = useCounterStore()
const {count, doubleCount,msg} = storeToRefs(store)

import { useChannelStore } from '@/stores/channel'
import { storeToRefs } from 'pinia';
const channelstore = useChannelStore()
// const count = ref(0)
import {Session} from '@/utils/storage'


const saveToken=()=>{
  Session.set('token','rgrdgrgcdefsgfsvdfgdfg')

}
import { NextLoading } from '@/utils/loading';

const loadings=()=>{
  NextLoading.start()
}

const stoploadings=()=>{
  // Session.set('token','rgrdgrgcdefsgfsvdfgdfg')
  NextLoading.done()

}


</script>

<template>
    <div>
        about  {{count}}--{{ doubleCount }}-{{ msg }}
        <!-- <div><button @click="channelstore.getchannellist">增加</button></div>
        <ul>
          <li v-for="item in channelstore.channellist" :key="item.id">{{item.name}}</li>
        </ul> -->
        <div><button @click="store.increment">增加</button></div>
        <div><button @click="store.decrement">减少</button></div>
        <div><button @click="saveToken">村token</button></div>
        
        <div><button @click="loadings">加载</button></div>
        <div><button @click="stoploadings">停止</button></div>




    </div>

</template>

<style scoped>
.read-the-docs {
  color: #888;
}
</style>
